﻿<style>
    i {
        color: red;
    }

    .col-xs-4 {
        padding-right: 0px;
    }
</style>
<div class="form-horizontal" ms-controller="WTFK">
    <div class="form-group">
        <label class="col-xs-2 control-label"><i>*</i>反馈时间</label>
        <div class="col-xs-4">
            <input type="text" class="form-control szhl_form_date  szhl_require" id="inputEmail3" ms-duplex="modelData.FKDate">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label"><i>*</i>反馈内容</label>
        <div class="col-xs-9">
            <textarea id="conContent" class="span2  szhl_UEEDIT  szhl_require focus" umheight="200" ms-duplex="modelData.FKContent"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label">附件</label>
        <div class="col-xs-9">
            <input type="text" value="" class="span2  szhl_Upload form-control" ms-duplex="modelData.Files" />
        </div>
    </div>
</div>
<script>

    var tempmodel = avalon.define({
        $id: "WTFK",
        name: "问题反馈",
        iswf: false,//是否属于流程表单
        modelData: { "FKDate": ComFunJS.getnowdate("yyyy-mm-dd"), "FKContent": "","Files": ""},
        inittemp: function (strId) {
            $.getJSON('/API/VIEWAPI.ashx?Action=XTGL_GETZIDIANLIST', { P1: 6 }, function (resultData) {
                if (resultData.ErrorMsg == "") {
                    tempmodel.ColumnData = resultData.Result;
                    if (tempmodel.ColumnData.size() > 0 && !tempmodel.modelData.LeiBie) {
                        tempmodel.modelData.LeiBie = resultData.Result[0].ID;
                    }
                }
            })

            if (strId) {
                //编辑加载数据
                $.getJSON('/API/VIEWAPI.ashx?Action=WTFK_GETWTFKMODEL', { P1: strId }, function (resultData) {
                    if (resultData.ErrorMsg == "") {
                        tempmodel.modelData = resultData.Result;
                        if (tempmodel.modelData.RBDate && tempmodel.modelData.RBDate.length > 10) {
                            tempmodel.modelData.RBDate = tempmodel.modelData.RBDate.substring(0, 10);
                        }
                        setTimeout("ComFunJS.initForm()", 500)
                    }
                })
            } else {
                pmodel.isDraft = true;
                ComFunJS.initForm();
            }

        },//初始化
        SaveData: function (callback, btdom) {
            $.post("/API/VIEWAPI.ashx?ACTION=WTFK_ADDWTFK", { P1: JSON.stringify(tempmodel.modelData.$model) }, function (result) {
                return callback.call(this, $.parseJSON(result));
            });
        }
    });
    //# sourceURL=WTFKTEMP.js;
</script>
